package com.lagou.edu.user.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lagou.edu.dto.UserDTO;
import com.lagou.edu.parma.UserQueryParam;
import com.lagou.edu.remote.UserRemoteService;
import com.lagou.edu.reponse.ResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 程  林
 * @date 2021-01-23 14:35
 * @description //
 * @since V1.0.0
 */
@RestController
@RequestMapping("/user")
public class BossUserController {

    @Autowired
    private UserRemoteService userRemoteService;

    @PostMapping(value = "/getUserPages")
    public ResponseDTO getUserPages(@RequestBody UserQueryParam userQueryParam) {
        Page<UserDTO> userPages = userRemoteService.getUserPages(userQueryParam);
        return ResponseDTO.success(userPages);
    }
}
